package gui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.tree.*;
import javax.swing.JTree;
import javax.swing.JToolBar;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JButton;
import javax.swing.JLabel;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JTextField;
import javax.swing.JList;

public class mainWindow extends JFrame {

	private JPanel contentPane;
	private JTextField textName;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					mainWindow frame = new mainWindow();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public mainWindow() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 649, 502);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JButton btnNeuesTurnier = new JButton("Neues Turnier");
		btnNeuesTurnier.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				
				String name;
				
				
				
				Turnier t = new Turnier("Counter Strike Source");
				name = t.getName();
				textName.setText(name);
				//tree.i
			
				
			}
		});
		btnNeuesTurnier.setBounds(163, 137, 112, 29);
		contentPane.add(btnNeuesTurnier);
		
		
		
		
		textName = new JTextField();
		textName.setEditable(false);
		textName.setBounds(344, 189, 86, 20);
		contentPane.add(textName);
		textName.setColumns(10);
		
		JList list = new JList();
		list.setBounds(84, 196, -66, -122);
		contentPane.add(list);
		
	}
}
